<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/include.jsp"%>

<script type="text/javascript">
var menuId = '${menuId}';
$(function() {
    var $menuiframe = $('#menuiframe');
    var $menutree = $('#menutree').tree({
        url: ctx + '/sys/menu/list',
        queryParams: {
            tree: true
        },
        lines: true,
        formatter: function(node) {
            return node.name || node.id;
        },
        onClick: function(node) {
            $menuiframe.attr('src', ctx + '/sys/menu/' + node.id);
        }
    });
    
});

function menutreeReload() {
    $('#menutree').tree('reload');
}
</script>

<title>TSWEB</title>
</head>
<body class="easyui-layout" style="margin:5px;">
    <div data-options="region:'west', title:'菜单结构', split:true, tools: [{id:'menu-refresh', iconCls:'icon-reload', handler:'menutreeReload'}]"
        style="width:15%;">
        <ul id="menutree"></ul>
    </div>
    <div data-options="region:'center', title:'菜单信息'">
        <!-- <iframe id="menuiframe" scrolling="auto" frameborder="0" style="width:100%; height:100%;"></iframe> -->
        <iframe id="menuiframe" style="width:100%; height:100%; border:0;"></iframe>
    </div>
</body>
</html>